package com.jiajia.arraylist.approve;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author : zjj
 * @date : 2021/1/12 16:23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Person {
    /**
     * 名称
     */
    private String username;
    /**
     * 年龄
     */
    private int age;

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj instanceof Person) {
            Person person  = (Person) obj;
            return this.age == ( person.age);
        }
        return false;
    }


}
